package edu.wust;

public class exam28 {

    public static void main(String[] args) {
        int sum = 1;
        int temp = 0;
        for (int i = 3; i <= 1001; i += 2) {
            temp = 4 * i * i - (6 * (i - 1));
            sum += temp;
        }
        System.out.println(sum);

    }

}

